package com.cellulam.framework.core.log.enums;


import com.cellulam.framework.core.enums.CodeDescriptionFeature;
import com.cellulam.framework.core.utils.EnumHelper;
import lombok.Getter;

/**
 * 日志类型
 */
@Getter
public enum BizLogType implements CodeDescriptionFeature {

    /**
     * 未知
     */
    UNKNOWN(0, "未知"),
    CLASS(1, "班级"),
    USER_STUDENT(2, "用户-学生"),
    USER_TEACHER(3, "用户-老师"),
    PASS_THROUGH(4, "闯关"),
    BOOK(5, "书籍"),
    POINT(6, "阅芽"),
    PAYMENT(7, "支付"),
    SCHOOL(8, "学校"),
    DONATION_BOOK(9, "赠书"),
    CLASS_JOB(10, "班级任务-教师操作"),
    DRIP(11, "水滴"),
    BEAN(12, "阅豆"),
    FARM_PROPS(13, "农场道具"),
    FARM_FIELD_ACTION(14, "农场农田操作"),
    ;

    private final int code;
    private final String description;

    BizLogType(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static BizLogType valueOf(int code) {
        return EnumHelper.valueOf(code, BizLogType.class);
    }
}
